package com.itheima.demo6proxy;

public class Star implements ServiceStar {
    private String name;
    private int age;
    public Star(){};
    public Star(String name,int age){
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Star{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public void sing(String name) {
        System.out.println("明星开始唱歌:"+name);
        System.out.println("明星结束唱歌");
    }

    @Override
    public String dance() {
        System.out.println("明星开始跳舞");
        System.out.println("明星结束跳舞");
        return "明星跳舞了";
    }
}
